Context dependent execution time prediction for redirecting queries

ABSTRACT

Context dependent execution time prediction may be applied to redirect queries to additional query processing resources. A query to a database may be received at a first query engine. A prediction model for executing queries at the first query engine may be applied to determine predicted query execution time for the first query engine. A prediction model for executing queries at a second query engine may also be applied to determine predicted query execution time for the second query engine. One of the query engines may be selected to perform the query based on a comparison of the predicted query execution times.

This application is a continuation of U.S. patent application Ser. No.16/364,055, filed Mar. 25, 2019, which are hereby incorporated byreference herein in its entirety.

BACKGROUND

As the technological capacity for organizations to create, track, andretain information continues to grow, a variety of differenttechnologies for managing and storing the rising tide of informationhave been developed. Database systems, for example, provide clients withmany different specialized or customized configurations of hardware andsoftware to manage stored information. However, the increasing amountsof data that organizations must store and manage often correspondinglyincreases both the size and complexity of data storage and managementtechnologies, like database systems, which in turn escalate the cost ofmaintaining the information. New technologies more and more seek toreduce both the complexity and storage requirements of maintaining datawhile simultaneously improving the efficiency of data processing.

For example, data processing is often measured by the speed at whichrequests to access data are performed. Some types of data accessrequests require intensive computational and storage access workloads,while other types of data access requests may only involve small amountsof work to process. As data stores may have to process both high and lowworkload access requests, techniques to perform the different types ofaccess requests may be implemented so that access request processing isoptimally performed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a logical block diagram of context dependentexecution time prediction for redirecting queries, according to someembodiments.

FIG. 2 is a logical block diagram illustrating a provider networkoffering data processing services that implement burst performance ofdatabase queries according to context dependent execution timeprediction for redirecting queries, according to some embodiments.

FIG. 3 is a logical block diagram of a data warehouse serviceimplementing primary and burst processing clusters that utilize a formatindependent data processing service to perform sub-queries to remotedata via query engines hosted in a format independent data processingservice, according to some embodiments.

FIG. 4 is a logical block diagram illustrating a format independent dataprocessing service, according to some embodiments.

FIG. 5 is a logical block diagram illustrating an example primaryprocessing cluster of a data warehouse service that implements a burstmanager, according to some embodiments.

FIG. 6 is a logical block diagram illustrating an example burstprocessing cluster of a data warehouse service using a formatindependent data processing service to perform queries sent to the burstprocessing cluster, according to some embodiments.

FIG. 7 is a logical block diagram illustrating an example of burstprocessing management at a primary cluster of a data warehouse service,according to some embodiments.

FIG. 8 is a logical block diagram illustrating example interactions toobtain and release a burst processing cluster from a pool of burstprocessing clusters, according to some embodiments.

FIG. 9 is a high-level flowchart illustrating methods and techniques toimplement context dependent execution time prediction for redirectingqueries, according to some embodiments.

FIG. 10 is a high-level flowchart illustrating methods and techniques toimplement evaluating predicted execution time ranges to implementcontext dependent execution time prediction for redirecting queries,according to some embodiments.

FIGS. 11A-11C are examples of predicted execution time ranges forevaluation, according to some embodiments.

FIG. 12 illustrates an example system that implements the variousmethods, techniques, and systems described herein, according to someembodiments.

While embodiments are described herein by way of example for severalembodiments and illustrative drawings, those skilled in the art willrecognize that embodiments are not limited to the embodiments ordrawings described. It should be understood, that the drawings anddetailed description thereto are not intended to limit embodiments tothe particular form disclosed, but on the contrary, the intention is tocover all modifications, equivalents and alternatives falling within thespirit and scope as defined by the appended claims. The headings usedherein are for organizational purposes only and are not meant to be usedto limit the scope of the description or the claims. As used throughoutthis application, the word “may” is used in a permissive sense (i.e.,meaning having the potential to), rather than the mandatory sense (i.e.,meaning must). Similarly, the words “include,” “including,” and“includes” mean including, but not limited to.

It will also be understood that, although the terms first, second, etc.may be used herein to describe various elements, these elements shouldnot be limited by these terms. These terms are only used to distinguishone element from another. For example, a first contact could be termed asecond contact, and, similarly, a second contact could be termed a firstcontact, without departing from the scope of the present invention. Thefirst contact and the second contact are both contacts, but they are notthe same contact.

DETAILED DESCRIPTION OF EMBODIMENTS

Various embodiments of context dependent execution time prediction forredirecting queries, according to some embodiments are described herein.Queries for data that satisfies various conditions or criteria,insertions, deletions, modifications, or any other request triggeringprocessing based on a request to access a data store may utilize variousprocessing resources, including various central processing units (CPUs),graphical processing units (GPUs), or other processing components thatmay execute various tasks to process database queries, in someembodiments. Because database queries may vary in terms of the workloadplaced upon the processing resources to execute the database query, insome embodiments, the amount of processing resources that any one queryengine may provide could be inadequate (or underutilized) to meet thedemands of some query workloads, in various embodiments.

For example, a query engine could be optimally sized to perform short,quick or other small-sized queries that are performed with a clientsystem expectation that a result of the query will be returned quickly.Long-running, slow, or other large-sized queries may not perform asefficiently at the same query engine (e.g., as it may not be distributedamongst a large number of nodes in a distributed query processingplatform like the clusters described below with regard to FIGS. 2-8).Therefore, additional or other burst capacity provided by an additionalquery engine (or multiple query engines) may be used to handle increasesin workload from database queries or other queries that could be moreoptimally performed using a different query engine, in some embodiments.

While adding additional query engines can increase number of concurrentqueries to a database without adversely affecting resource utilizationon a single query engine, the behavior of different query engines forthe same queries may not be the same (and thus a prediction of queryexecution time may also be different for the same query at differentquery engines). For example, a second query engine could utilize adifferent source for the database data, such as by using a local copythat is updated from the primary query engine or using cached or backupcopy stored in a separate data store (e.g., database data stored in anobject store and accessed via a separate data processing service asdiscussed below with regard to FIG. 6), whereas a primary or main queryengine could access database data differently (e.g., on local diskscollocated with the primary query engine. Furthermore, query engines mayutilize different numbers of nodes (e.g., in a distributed processingcluster like in FIGS. 5 and 6) so that some queries running on asecondary cluster may be slower than the same query on a larger maincluster, whereas in a reverse configuration the opposite performanceresult may be occur. There are also differences in query engines thatreceive queries for burst processing so that not all queries may runfaster on all secondary query engines (e.g., queries may run faster orslower based on which secondary engine they are routed to).

In some embodiments, queries may not be redirected unless the primaryquery engine is busy performing other queries and the received querieswould wait (e.g., queue) before running. In such embodiments, thequeries may benefit from executing on a secondary query engine if theyrun faster on the secondary query engine when compared to the combinedwait time and execution time at the primary query engine, as discussedbelow with regard to FIG. 10. Further differences can depend upon theconfigured concurrency, size and hardware types of the systemsimplementing the query engine and quality of statistics of the primaryquery engine and lead time to initialize a secondary query engine.

In various embodiments, context dependent execution time prediction forredirecting queries may be implemented to automatically andintelligently choose when to redirect queries to perform a query so thatthe costs of utilizing the burst resources are not outweighed by itsbenefits (e.g., providing faster performance for queries to the databaseoverall without increasing resource costs or wasting additionalresources), improving the performance of database or other systems thatperform queries and improve the utilization of computing resources toperform database queries for a database system overall than wouldsystems that do not incorporate context dependent execution timeprediction for redirecting queries.

FIG. 1 illustrates a logical block diagram of context dependentexecution time prediction for redirecting queries, according to someembodiments. Query engine 110 may be a query processing platform,application or system of one or multiple components (e.g., a processingcluster as discussed below that includes one or multiple processingnodes or a single node query engine) that can perform queries, such asquery 140 to a database, by accessing database data 130, in someembodiments. Database data 130 may be stored or co-located with queryengine 110 in some embodiments (e.g., in attached storage as describedbelow in FIG. 5) or may be a separate data store (e.g., network attachedstorage and/or a separate storage service), in some embodiments.Database data 130 may be stored for various types of databases to whichqueries may be performed (e.g., relational, non-relational, NoSQL,document, graph, etc.), in some embodiments. FIGS. 3-8, for instance,discuss a data warehouse style database that stores database data, aswell as other data stores, such as object-based storage service 330(which may be general data stores which store data other types orformats of data in addition to database data.) Query engine 110 mayoperate within execution context 112 (e.g., which may be a differentconfiguration of hardware, software, or other resources for performing aquery, including a different number of nodes (in a distributed queryengine), different technique for accessing data, difference in hardwarecapabilities, among other different execution features).

In some embodiments, an additional query engine, such as query engine120, or multiple additional query engines (not illustrated), may beimplemented to perform some queries. Like query engine 110, query engine120 may be a query processing platform, application or system of one ormultiple components (e.g., a processing cluster as discussed below thatincludes one or multiple processing nodes or a single node query engine)that can perform queries, such as query 140 to a database, by accessingdatabase data 130, in some embodiments. Query engine 120 may bedifferent than query engine 110, in some embodiments (e.g., a differentnumber of nodes, different hardware resources, and/or different engineapplications or other query performance components), and thus mayoperation in a different execution context 122. In some embodiments,query engine 120 may be substantially similar (or the same) as queryengine 110.

Query engine 110 may implement context dependent execution timeprediction 114 in order to select whether a database query is performedat query engine 110 or another query engine, such as query engine 120.As discussed in detail below with regard to FIGS. 7 and 9-11C, contextdependent execution time prediction may provide execution timepredictions specific to each query engine according to prediction modelstrained for each query engine from prior query performance at the queryengine. In this way, the differences in execution context are accountedfor the in the predicted query execution times used to select a moreoptimal performance location for a query. Further considerations may beadded to or evaluated alongside with the predicted query executiontimes, such as an initialization time for a secondary query engine orexpected wait time at a primary query engine, as discussed below.

Please note that the previous description of a query engine, contextdependent execution time prediction, database data, and performance ofqueries is a logical description and thus is not to be construed aslimiting as to the implementation of a query engine, size-based burstperformance, database data, and performance of queries, or portionsthereof. For example, query engine 120 could return query results 144 toquery engine 110, which may then responds to query 140, similar to theinteractions discussed below with regard to FIGS. 5 and 6.

This specification begins with a general description of a providernetwork that implements multiple different services, including dataprocessing services and storage services, which may perform burstperformance of database queries according to context-dependent executiontime prediction. Then various examples of multiple data processors, suchas a data warehouse service and a format independent data processingservice, including different components/modules, or arrangements ofcomponents/module that may be employed as part of implementing the dataprocessors are discussed. A number of different methods and techniquesto implement context dependent execution time prediction for redirectingqueries are then discussed, some of which are illustrated inaccompanying flowcharts. Finally, a description of an example computingsystem upon which the various components, modules, systems, devices,and/or nodes may be implemented is provided. Various examples areprovided throughout the specification.

FIG. 2 is a logical block diagram illustrating a provider networkoffering data processing services that implement burst performance ofdatabase queries according to context dependent execution timeprediction for redirecting queries, according to some embodiments.Provider network 200 may be a private or closed system or may be set upby an entity such as a company or a public sector organization toprovide one or more services (such as various types of cloud-basedstorage) accessible via the Internet and/or other networks to clients250. Provider network 200 may be implemented in a single location or mayinclude numerous data centers hosting various resource pools, such ascollections of physical and/or virtualized computer servers, storagedevices, networking equipment and the like (e.g., computing system 2000described below with regard to FIG. 12), needed to implement anddistribute the infrastructure and storage services offered by theprovider network 200. In some embodiments, provider network 200 mayimplement various computing resources or services, such as dataprocessing service(s) 210, (e.g., a map reduce service, a data warehouseservice, and/or other large scale data processing services or databaseservices), format independent data processing service 220, and datastorage services 230 (e.g., object storage services or block-basedstorage services that may implement a centralized data store for varioustypes of data), and/or any other type of network based services (whichmay include a virtual compute service and various other types ofstorage, processing, analysis, communication, event handling,visualization, and security services not illustrated).

In various embodiments, the components illustrated in FIG. 2 may beimplemented directly within computer hardware, as instructions directlyor indirectly executable by computer hardware (e.g., a microprocessor orcomputer system), or using a combination of these techniques. Forexample, the components of FIG. 2 may be implemented by a system thatincludes a number of computing nodes (or simply, nodes), each of whichmay be similar to the computer system embodiment illustrated in FIG. 12and described below. In various embodiments, the functionality of agiven system or service component (e.g., a component of data processingservice 210, format independent data processing service 220, or datastorage service 230) may be implemented by a particular node or may bedistributed across several nodes. In some embodiments, a given node mayimplement the functionality of more than one service system component(e.g., more than one data store component).

Data processing services 210 may be various types of data processingservices that perform general or specialized data processing functions(e.g., anomaly detection, machine learning, data mining, big dataquerying, or any other type of data processing operation). For example,in at least some embodiments, data processing services 210 may include amap reduce service that creates clusters of processing nodes thatimplement map reduce functionality over data stored in the map reducecluster as well as data stored in one of data storage services 230. Inanother example, data processing service(s) 210 may include varioustypes of database services (both relational and non-relational) forstoring, querying, and updating data. Such services may beenterprise-class database systems that are highly scalable andextensible. Queries may be directed to a database in data processingservice(s) 210 that is distributed across multiple physical resources,and the database system may be scaled up or down on an as needed basis.The database system may work effectively with database schemas ofvarious types and/or organizations, in different embodiments. In someembodiments, clients/subscribers may submit queries in a number of ways,e.g., interactively via an SQL interface to the database system. Inother embodiments, external applications and programs may submit queriesusing Open Database Connectivity (ODBC) and/or Java DatabaseConnectivity (JDBC) driver interfaces to the database system. Forinstance, data processing service(s) 210 may implement, in someembodiments, a data warehouse service, such as discussed below withregard to FIG. 3 that utilizes another data processing service, such asformat independent data processing service 220, to execute portions ofqueries or other access requests with respect to data that is stored ina remote data store, such as data storage service(s) 230 (or a datastore external to provider network 200) to implement distributed dataprocessing for distributed data sets.

Format independent data processing service 220, as discussed in moredetail below with regard to FIGS. 3-6, may provide a service supportingmany different data or file formats for data stored in a centralizeddata store, like one (or more) of data storage service(s) 230 includingdata stored in the file formats supported by data processing service(s)210. Instead of reformatting (if the format of data in remote storage isnot supported by the data processing service(s) 210) and moving datafrom data storage service(s) 230 into the data processing service(s)210, format independent data processing service 220 may efficiently readdata from data storage service(s) 230 according to the data format inwhich the data is already stored in data storage service(s) 230. Formatindependent data processing service 220 may perform requestedoperations, such as scan operations that filter or project data results,aggregation operations that aggregate data values and provide partial orcomplete aggregation results, sorting, grouping, or limiting operationsthat organize or reduce the determined data results from data in datastorage service(s) 230 in order to minimize the amount of datatransferred out of data storage service(s) 230.

For example, format independent data processing service 220 may executedifferent operations that are part of a larger query plan generated at adata processing service 210 and provide results to the data processingservice 210 by relying upon requests from data processing service(s) 210to determine the different operations to perform. In this way, formatindependent data processing service 220 may be implemented as adynamically scalable and stateless data processing service that is faulttolerant without the need to support complex query planning andexecution for multiple different data formats. Instead, formatindependent data processing service 230 may offer a set of dataprocessing capabilities to access data stored in a wide variety of dataformats (which may not be supported by different data processingservice(s) 210) that can be programmatically initiated on behalf ofanother data processing client, such as data processing service 210.

Data storage service(s) 230 may implement different types of data storesfor storing, accessing, and managing data on behalf of clients 250 as anetwork-based service that enables clients 250 to operate a data storagesystem in a cloud or network computing environment. Data storageservice(s) 230 may also include various kinds of object or file datastores for putting, updating, and getting data objects or files. Forexample, one data storage service 230 may be an object-based data storethat allows for different data objects of different formats or types ofdata, such as structured data (e.g., database data stored in differentdatabase schemas), unstructured data (e.g., different types of documentsor media content), or semi-structured data (e.g., different log files,human-readable data in different formats like JavaScript Object Notation(JSON) or Extensible Markup Language (XML)) to be stored and managedaccording to a key value or other unique identifier that identifies theobject. In at least some embodiments, data storage service(s) 230 may betreated as a data lake. For example, an organization may generate manydifferent kinds of data, stored in one or multiple collections of dataobjects in a data storage service 230. The data objects in thecollection may include related or homogenous data objects, such asdatabase partitions of sales data, as well as unrelated or heterogeneousdata objects, such as audio files and web site log files. Data storageservice(s) 230 may be accessed via programmatic interfaces (e.g., APIs)or graphical user interfaces. For example, format independent dataprocessing service 220 may access data objects stored in data storageservices via the programmatic interfaces (as discussed below with regardto FIGS. 5-6).

Generally speaking, clients 250 may encompass any type of client thatcan submit network-based requests to provider network 200 via network260, including requests for storage services (e.g., a request to query adata processing service 210, or a request to create, read, write,obtain, or modify data in data storage service(s) 230, etc.). Forexample, a given client 250 may include a suitable version of a webbrowser, or may include a plug-in module or other type of code modulethat can execute as an extension to or within an execution environmentprovided by a web browser. Alternatively, a client 250 may encompass anapplication such as a database application (or user interface thereof),a media application, an office application or any other application thatmay make use of data processing service(s) 210, format independent dataprocessing service 220, or storage resources in data storage service(s)230 to store and/or access the data to implement various applications.In some embodiments, such an application may include sufficient protocolsupport (e.g., for a suitable version of Hypertext Transfer Protocol(HTTP)) for generating and processing network-based services requestswithout necessarily implementing full browser support for all types ofnetwork-based data. That is, client 250 may be an application that caninteract directly with provider network 200. In some embodiments, client250 may generate network-based services requests according to aRepresentational State Transfer (REST)-style network-based servicesarchitecture, a document- or message-based network-based servicesarchitecture, or another suitable network-based services architecture.

In some embodiments, a client 250 may provide access to provider network200 to other applications in a manner that is transparent to thoseapplications. For example, client 250 may integrate with an operatingsystem or file system to provide storage on one of data storageservice(s) 230 (e.g., a block-based storage service). However, theoperating system or file system may present a different storageinterface to applications, such as a conventional file system hierarchyof files, directories and/or folders. In such an embodiment,applications may not need to be modified to make use of the storagesystem service model. Instead, the details of interfacing to the datastorage service(s) 230 may be coordinated by client 250 and theoperating system or file system on behalf of applications executingwithin the operating system environment. Similarly, a client 250 may bean analytics application that relies upon data processing service(s) 210to execute various queries for data already ingested or stored in thedata processing service (e.g., such as data maintained in a datawarehouse service, like data warehouse service 300 in FIG. 3 below) ordata stored in a data lake hosted in data storage service(s) 230 byperforming federated data processing between the data processing service210 and format independent data processing service 220 (as discussedbelow with regard to FIG. 5).

Clients 250 may convey network-based services requests (e.g., accessrequests to read or write data may be directed to data in data storageservice(s) 230, or operations, tasks, or jobs, such as queries, beingperformed as part of data processing service(s) 210) to and receiveresponses from provider network 200 via network 260. In variousembodiments, network 260 may encompass any suitable combination ofnetworking hardware and protocols necessary to establishnetwork-based-based communications between clients 250 and providernetwork 200. For example, network 260 may generally encompass thevarious telecommunications networks and service providers thatcollectively implement the Internet. Network 260 may also includeprivate networks such as local area networks (LANs) or wide areanetworks (WANs) as well as public or private wireless networks. Forexample, both a given client 250 and provider network 200 may berespectively provisioned within enterprises having their own internalnetworks. In such an embodiment, network 260 may include the hardware(e.g., modems, routers, switches, load balancers, proxy servers, etc.)and software (e.g., protocol stacks, accounting software,firewall/security software, etc.) necessary to establish a networkinglink between given client 250 and the Internet as well as between theInternet and provider network 200. It is noted that in some embodiments,clients 250 may communicate with provider network 200 using a privatenetwork rather than the public Internet. In some embodiments, clients ofdata processing services 210, format independent data processing service220, and/or data storage service(s) 230 may be implemented withinprovider network 200 (e.g., an application hosted on a virtual computingresource that utilizes a data processing service 210 to perform databasequeries) to implement various application features or functions and thusvarious features of client(s) 250 discussed above may be applicable tosuch internal clients as well.

In at least some embodiments, one of data processing service(s) 220 maybe a data warehouse service. FIG. 3 is a logical block diagram of a datawarehouse service implementing primary and burst processing clustersthat utilize a format independent data processing service to performsub-queries to remote data via query engines hosted in a formatindependent data processing service, according to some embodiments. Adata warehouse service, such as data warehouse service 300, may offerclients a variety of different data management services, according totheir various needs. In some cases, clients may wish to store andmaintain large of amounts data, such as sales records marketing,management reporting, business process management, budget forecasting,financial reporting, website analytics, or many other types or kinds ofdata. A client's use for the data may also affect the configuration ofthe data management system used to store the data. For instance, forcertain types of data analysis and other operations, such as those thataggregate large sets of data from small numbers of columns within eachrow, a columnar database table may provide more efficient performance.In other words, column information from database tables may be storedinto data blocks on disk, rather than storing entire rows of columns ineach data block (as in traditional database schemes). The followingdiscussion describes various embodiments of a relational columnardatabase system. However, various versions of the components discussedbelow as may be equally adapted to implement embodiments for variousother types of relational database systems, such as row-orienteddatabase systems. Therefore, the following examples are not intended tobe limiting as to various other types or formats of database systems.

In some embodiments, storing table data in such a columnar fashion mayreduce the overall disk I/O requirements for various queries and mayimprove analytic query performance. For example, storing database tableinformation in a columnar fashion may reduce the number of disk I/Orequests performed when retrieving data into memory to perform databaseoperations as part of processing a query (e.g., when retrieving all ofthe column field values for all of the rows in a table) and may reducethe amount of data that needs to be loaded from disk when processing aquery. Conversely, for a given number of disk requests, more columnfield values for rows may be retrieved than is necessary when processinga query if each data block stored entire table rows. In someembodiments, the disk requirements may be further reduced usingcompression methods that are matched to the columnar storage data type.For example, since each block contains uniform data (i.e., column fieldvalues that are all of the same data type), disk storage and retrievalrequirements may be further reduced by applying a compression methodthat is best suited to the particular column data type. In someembodiments, the savings in space for storing data blocks containingonly field values of a single column on disk may translate into savingsin space when retrieving and then storing that data in system memory(e.g., when analyzing or otherwise processing the retrieved data).

Data warehouse service 300 may be implemented by a large collection ofcomputing devices, such as customized or off-the-shelf computingsystems, servers, or any other combination of computing systems ordevices, such as the various types of systems 2000 described below withregard to FIG. 12. Different subsets of these computing devices may becontrolled by control plane 310. Control plane 310, for example, mayprovide a cluster control interface to clients or users who wish tointeract with the processing clusters 320 managed by control plane 310.For example, control plane 310 may generate one or more graphical userinterfaces (GUIs) for storage clients, which may then be utilized toselect various control functions offered by the control interface forthe processing clusters 320 hosted in the data warehouse service 300.Control plane 310 may provide or implement access to various metricscollected for the performance of different features of data warehouseservice 300, including processing cluster performance and the metricscollected with respect to result cache performance for sub-queries bycache management, in some embodiments.

As discussed above, various clients (or customers, organizations,entities, or users) may wish to store and manage data using a datamanagement service. Processing clusters may respond to various requests,including write/update/store requests (e.g., to write data into storage)or queries for data (e.g., such as a Server Query Language request (SQL)for particular data), as discussed below with regard to FIG. 5, alongwith many other data management or storage services. Multiple users orclients may access a processing cluster to obtain data warehouseservices. In at least some embodiments, a data warehouse service 300 mayprovide network endpoints to the clusters which allow the clients tosend requests and other messages directly to a particular cluster.Network endpoints, for example may be a particular network address, suchas a URL, which points to a particular cluster. For instance, a clientmay be given the network endpoint “http://mycluster.com” to send variousrequest messages to. Multiple clients (or users of a particular client)may be given a network endpoint for a particular cluster. Varioussecurity features may be implemented to prevent unauthorized users fromaccessing the clusters. Conversely, a client may be given networkendpoints for multiple clusters.

Processing clusters, such as processing clusters 320 and 340, hosted bythe data warehouse service 300 may provide an enterprise-class databasequery and management system that allows users to send data processingrequests to be executed by the clusters 320, such as by sending a queryto a cluster control interface implemented by the network-based service.Processing clusters 320 may perform data processing operations withrespect to data stored locally in a processing cluster, as well asremotely stored data. For example, object-based storage service 330 maybe a data storage service 230 implemented by provider network 200 thatstores remote data, such as backups or other data of a database storedin a cluster. In some embodiments, database data may not be storedlocally in a processing cluster 320 but instead may be stored inobject-based storage service 330 (e.g., with data being partially ortemporarily stored in processing cluster 320 to perform queries).Queries sent to a processing cluster 320 (orrouted/redirect/assigned/allocated to processing cluster(s) 340 fromprocessing cluster(s) 320) may be directed to local data stored in theprocessing cluster and/or remote data. Therefore, processing clustersmay implement local data processing, such as local data processing 322and 342, (discussed below with regard to FIGS. 5 and 6) to plan andexecute the performance of queries with respect to local data in theprocessing cluster, as well as a remote data processing client, such asremote data processing clients 324 and 344, to direct execution ofdifferent sub-queries (e.g., operations determined as part of the queryplan generated at the processing cluster 320) that are assigned toformat independent data processing service 220 with respect toprocessing remote database data 332).

In some embodiments, data warehouse service 300 may implement primaryclusters 330 and burst cluster pool 350. Primary clusters 330 may bereserved, allocated, permanent, or otherwise dedicated processingresources that store and/or provide access to a database for a client ofdata warehouse service 300, in some embodiments. Burst cluster pool 350may be a set of warmed, pre-configured, initialized, or otherwiseprepared clusters which may be on standby to provide additional queryperformance capacity for a primary cluster 330. Control plane 310 maymanage burst cluster pool 350 by managing the size of burst cluster pool350 (e.g., by adding or removing processing clusters 340 based ondemand). Control plane 310 may determine the capabilities orconfiguration (which may be different) of processing cluster(s) 340 inburst cluster pool 350 (e.g., maintaining a number of 10 node clusters,15 node clusters, 20 node clusters, etc.). Processing clusters 340 inburst cluster pool 350 may be obtained or provisioned for a primarycluster 330, as discussed in detail below with regard to FIG. 8.

As databases are created, updated, and/or otherwise modified, snapshots,copies, or other replicas of the database at different states may bestored separate from data warehouse service 300 in object-based storageservice 330, in some embodiments. For example, a leader node, or otherprocessing cluster component, may implement a backup agent or systemthat creates and store database backups for a database to be stored asdatabase data 332 in object-based storage service 330. Database data 332may include user data (e.g., tables, rows, column values, etc.) anddatabase metadata (e.g., information describing the tables which may beused to perform queries to a database, such as schema information, datadistribution, range values or other content descriptors for filteringout portions of a table from a query, etc.). A timestamp or othersequence value indicating the version of database data 332 may bemaintained in some embodiments, so that the latest database data 332may, for instance, be obtained by a processing cluster in order toperform queries sent for burst query performance.

FIG. 4 is a logical block diagram illustrating a format independent dataprocessing service, according to some embodiments. As noted above inFIG. 2, format independent data processing service 220 may receiverequests to perform processing operations with respect to data stored432 stored in a data storage service (e.g., backup data or otherdatabase data, such as other database tables or data that is not storedaccording to a format, schema, or structure like that of data stored indata warehouse service 300). Processing requests may be received from aclient, such as remote data processing client(s) 402 (which may anotherdata processing service 210, like data warehouse service 300 or anotherdata processing client, such as a database engine/cluster or map reducecluster implemented outside of provider network 200 and communicatingwith format independent data processing service 220 in order to processqueries with respect to data stored within provider network 200 in adata storage service 230 or to process data stored outside of providernetwork 200 (when the data is made accessible to format independent dataprocessing service 220).

Format independent data processing service 220 may implement a controlplane 410 and multiple processing node(s) 420 to execute processingrequests received from remote data processing client(s) 402. Controlplane 410 may arbitrate, balance, select, or dispatch requests todifferent processing node(s) 420 in various embodiments. For example,control plane 410 may implement interface 412 which may be aprogrammatic interface, such as an application programming interface(API), that allows for requests to be formatted according to theinterface 412 to programmatically invoke operations. In someembodiments, the API may be defined to allow operation requests definedas objects of code generated at and sent from remote data processingclient(s) 402 (based on a query plan generated at remote data processingclient(s) 402) to be compiled or executed in order to perform theassigned operations at format independent data processing service 220.

In some embodiments, format independent data processing service 220 mayimplement load balancing 418 to distribute remote processing requestsacross different processing node(s) 420. For example, a remoteprocessing request received via interface 412 may be directed to anetwork endpoint for a load-balancing component of load balancing 418(e.g., a load balancing server or node) which may then dispatch therequest to one of processing node(s) 420 according to a load balancingscheme. A round-robin load balancing, for instance, may be used toensure that remote data processing requests are fairly distributedamongst processing node(s) 420. However, various other load-balancingschemes may be implemented. As format independent data processingservice 220 may receive many remote data processing requests frommultiple remote data processing client(s) 402, load balancing 418 mayensure that incoming requests are not directed to busy or overloadedprocessing node(s) 420.

Format independent data processing service 220 may also implementresource scaling 414. Resource scaling 414 may detect when the currentrequest rate or workload upon a current number of processing node(s) 420exceeds or falls below over-utilization or under-utilization thresholdsfor processing nodes. In response to detecting that the request rate orworkload exceeds an over-utilized threshold, for example, then resourcesscaling 414 may provision, spin up, activate, repurpose, reallocate, orotherwise obtain additional processing node(s) 420 to processingreceived remote data processing requests. Similarly, the number ofprocessing node(s) 420 could be reduced by resource scaling 414 in theevent that the request rate or workload of processing node(s) fallsbelow the under-utilization threshold.

Format independent data processing service 220 may also implementfailure management 416 to monitor processing node(s) 420 and othercomponents of format independent data processing service 220 for failureor other health or performance states that may need to be repaired orreplaced. For example, failure management 416 may detect when aprocessing node fails or becomes unavailable (e.g., due to a networkpartition) by polling processing node(s) 420 to obtain health orperformance status information. Failure management may initiate shutdownor halting of processing at failing processing node(s) 420 and provisionreplacement processing node(s) 420.

Processing node(s) 420 may be implemented as separate computing nodes,servers, or devices, such as computing systems 2000 in FIG. 12, toperform data processing operations on behalf of remote data processingclient(s) 402. Processing node(s) 420 may implement stateless, in-memoryprocessing to execute processing operations, in some embodiments. Inthis way, processing node(s) 420 may have fast data processing rates.Processing node(s) 420 may implement clientauthentication/identification 421 to determine whether a remote dataprocessing client 402 has the right to access data 432 in storageservice 430. For example, client authentication/identification 421 mayevaluate access credentials, such as a username and password, token, orother identity indicator by attempting to connect with storage service430 using the provided access credentials. If the connection attempt isunsuccessful, then the data processing node 402 may send an errorindication to remote data processing client 402.

Processing node(s) 420 may implement query processing 422 or otherfeatures of a query engine which may perform multiple differentsub-queries (e.g., processing operations) and support multiple differentdata formats. For example, query processing 422 may implement separatetuple scanners for each data format which may be used to perform scanoperations that scan data 432 and which may filter or project from thescanned data, search (e.g., using a regular expression) or sort (e.g.,using a defined sort order) the scanned data, aggregate values in thescanned data (e.g., count, minimum value, maximum value, and summation),and/or group by or limit results in the scanned data. Remote dataprocessing requests may include an indication of the data format fordata 432 so that query processing 422 may use the corresponding tuplescanner for data 432. Query processing 422 may, in some embodiments,transform results of operations into a different data format or schemaaccording to a specified output data format in the remote dataprocessing request.

In some embodiments, data 432 may be stored in encrypted or compressedformat. Processing node(s) 420 may implement compression engine(s) 424to decompress data 432 according to a compression technique identifiedfor data 432, such as lossless compression techniques like run-lengthencoding, Lempel-Ziv based encoding, or bzip based encoding. Processingnode(s) 420 may implement encryption engine(s) 426 to decrypt data 432according to an encryption technique and/or encryption credential, suchas a key, identified for data 432, such as symmetric key orpublic-private key encryption techniques.

Processing node(s) 420 may implement storage access 428 to format,generate, send and receive requests to access data 432 in storageservice 430. For example, storage access 428 may generate requests toobtain data according to a programmatic interface for storage service430. In some embodiments, other storage access protocols, such asinternet small computer interface (iSCSI), may be implemented to accessdata 432.

FIG. 5 is a logical block diagram illustrating an example primaryprocessing cluster of a data warehouse service using a formatindependent data processing service that implements burst manager,according to some embodiments. Primary processing cluster 500 may bedata warehouse service cluster, like processing clusters 320 discussedabove with regard to FIG. 3, or another processing cluster thatdistributes execution of a query among multiple processing nodes. Asillustrated in this example, a primary processing cluster 500 mayinclude a leader node 510 and compute nodes 520 a, 520 b, and 520 n,which may communicate with each other over an interconnect (notillustrated). Leader node 510 may implement query planning 512 togenerate query plan(s), query execution 514 for executing queries onprimary processing cluster 500 that perform data processing that canutilize remote query processing resources for remotely stored data(e.g., by utilizing one or more query execution slot(s)/queue(s) 517)and burst manager 515 for selecting, routing, directing, or otherwisecausing a received query to be performed using burst capacity resources,such as a burst processing cluster 600 in FIG. 6 discussed below. Asdescribed herein, each node in a primary processing cluster 500 mayinclude attached storage, such as attached storage 522 a, 522 b, and 522n, on which a database (or portions thereof) may be stored on behalf ofclients (e.g., users, client applications, and/or storage servicesubscribers).

Note that in at least some embodiments, query processing capability maybe separated from compute nodes, and thus in some embodiments,additional components may be implemented for processing queries.Additionally, it may be that in some embodiments, no one node inprocessing cluster 500 is a leader node as illustrated in FIG. 5, butrather different nodes of the nodes in processing cluster 500 may act asa leader node or otherwise direct processing of queries to data storedin processing cluster 500. While nodes of processing cluster may beimplemented on separate systems or devices, in at least someembodiments, some or all of processing cluster may be implemented asseparate virtual nodes or instance on the same underlying hardwaresystem (e.g., on a same server).

In at least some embodiments, primary processing cluster 500 may beimplemented as part of a data warehouse service, as discussed above withregard to FIG. 3, or another one of data processing service(s) 210.Leader node 510 may manage communications with clients, such as clients250 discussed above with regard to FIG. 2. For example, leader node 510may be a server that receives a query 501 from various client programs(e.g., applications) and/or subscribers (users), then parses them anddevelops an execution plan (e.g., query plan(s)) to carry out theassociated database operation(s)). More specifically, leader node 510may develop the series of steps necessary to obtain results for thequery. Query 501 may be directed to data that is stored both locallywithin processing cluster 500 (e.g., at one or more of compute nodes520) and data stored remotely (which may be accessible by formatindependent data processing service 220). Leader node 510 may alsomanage the communications among compute nodes 520 instructed to carryout database operations for data stored in the processing cluster 500.For example, node-specific query instructions 504 may be generated orcompiled code by query execution 514 that is distributed by leader node510 to various ones of the compute nodes 520 to carry out the stepsneeded to perform query 501, including executing the code to generateintermediate results of query 501 at individual compute nodes may besent back to the leader node 510. Leader node 510 may receive data andquery responses or results from compute nodes 520 in order to determinea final result 503 for query 501. A database schema, data format and/orother metadata information for the data stored among the compute nodes,such as the data tables stored in the cluster, may be managed and storedby leader node 510. Query planning 512 may account for remotely storeddata by generating node-specific query instructions that include remoteoperations to be directed by individual compute node(s). As discussed inmore detail below with regard to FIG. 7, a leader node may implementburst manager 515 to send 506 a query plan generated by query planning512 to be performed at a burst processing cluster and return results 508received from the burst processing cluster to a client as part ofresults 503. In this way, burst query processing may occur withoutclient application changes to establish a separate connection orcommunication scheme with burst processing resources, allowing forseamless scaling between primary and burst processing capacity.

In at least some embodiments, a result cache may be implemented as partof leader node 510. For example, as query results are generated, theresults may also be stored in result cache (or pointers to storagelocations that store the results either in primary processing cluster500 or in external storage locations), in some embodiments. The resultcache may be used instead of burst capacity, in some embodiments, byrecognizing queries which would otherwise be sent to a burst processingcluster to be performed that have results stored in the result cache.Various caching strategies (e.g., LRU, FIFO, etc.) for result cache 519may be implemented, in some embodiments. Although not illustrated inFIG. 4, a result cache could be stored in other storage systems (e.g.,other storage services, such as a NoSQL database) and/or could storesub-query results for requests to format independent data processingservice 220 instead of or in addition to full query results).

Processing cluster 500 may also include compute nodes, such as computenodes 520 a, 520 b, and 520 n. Compute nodes 520, may for example, beimplemented on servers or other computing devices, such as thosedescribed below with regard to computer system 2000 in FIG. 12, and eachmay include individual query processing “slices” defined, for example,for each core of a server's multi-core processor, one or more queryprocessing engine(s), such as query engine(s) 524 a, 524 b, and 524 n,to execute the instructions 504 or otherwise perform the portions of thequery plan assigned to the compute node. Query engine(s) 524 may accessa certain memory and disk space in order to process a portion of theworkload for a query (or other database operation) that is sent to oneor more of the compute nodes 520. Query engine 524 may access attachedstorage, such as 522 a, 522 b, and 522 n, to perform local operation(s),such as local operations 518 a, 518 b, and 518 n. For example, queryengine 524 may scan data in attached storage 522, access indexes,perform joins, semi joins, aggregations, or any other processingoperation assigned to the compute node 520.

Although not illustrated query engine 524 a may also direct theexecution of remote data processing operations, by providing remoteoperation(s to remote data processing clients, similar to the techniquesdiscussed below with regard to FIG. 6. Remote data processing clientsmay be implemented by a client library, plugin, driver or othercomponent that sends request sub-queries to format independent dataprocessing service 220. As noted above, in some embodiments, formatindependent data processing service 220 may implement a common networkendpoint to which request sub-quer(ies) are directed, and then maydispatch the requests to respective processing nodes. Remote dataprocessing clients may read, process, or otherwise obtain results fromprocessing nodes, including partial results of different operations(e.g., aggregation operations) and may provide sub-query result(s), backto query engine(s) 524, which may further process, combine, and orinclude them with results of local operations 518.

Compute nodes 520 may send intermediate results from queries back toleader node 510 for final result generation (e.g., combining,aggregating, modifying, joining, etc.). Remote data processing clients526 may retry sub-query request(s) 532 that do not return within a retrythreshold. As format independent data processing service 220 may bestateless, processing operation failures at processing node(s) 540 maynot be recovered or taken over by other processing nodes 540, remotedata processing clients may track the success or failure of requestedoperation(s), and perform retries when needed.

Attached storage 522 may be implemented as one or more of any type ofstorage devices and/or storage system suitable for storing dataaccessible to the compute nodes, including, but not limited to:redundant array of inexpensive disks (RAID) devices, disk drives (e.g.,hard disk drives or solid state drives) or arrays of disk drives such asJust a Bunch Of Disks (JBOD), (used to refer to disks that are notimplemented according to RAID), optical storage devices, tape drives,RAM disks, Storage Area Network (SAN), Network Access Storage (NAS), orcombinations thereof. In various embodiments, disks may be formatted tostore database tables (e.g., in column oriented data formats or otherdata formats).

FIG. 6 is a logical block diagram illustrating an example burstprocessing cluster of a data warehouse service using a formatindependent data processing service to perform queries sent to the burstprocessing cluster, according to some embodiments. Similar to primaryprocessing cluster 500 in FIG. 5, burst processing cluster 600 mayinclude a leader node 610 and compute nodes 620 a, 620 b, and 620 n,which may communicate with each other over an interconnect (notillustrated). Leader node 610 may implement query execution 612 forexecuting queries on burst processing cluster 600. For example, leadernode 610 may receive a query plan 602 to perform a query from a primaryprocessing cluster. Query execution 612 may generate the instructions orcompile code to perform the query according to the query plan. Leadernode 610 may also manage the communications among compute nodes 620instructed to carry out database operations for data stored in the burstprocessing cluster 600. For example, node-specific query instructions604 may be generated or compiled code by query execution 612 that isdistributed by leader node 610 to various ones of the compute nodes 620to carry out the steps needed to perform query plan 602, includingexecuting the code to generate intermediate results of the query atindividual compute nodes may be sent back to the leader node 610. Leadernode 610 may receive data and query responses or results from computenodes 620 in order to determine a final result 606 for the query to besent back to the primary processing cluster.

In at least some embodiments, burst processing cluster 600 may notmaintain a local copy of the database, but instead may access a backupof the database (or the database directly which may not be maintainedlocally at primary processing clusters) via format independent dataprocessing service 220. For example, query engine 624 a may direct theexecution of remote data processing operations, by providing remoteoperation(s), such as remote operations 616 a, 616 b, and 616 n, toremote data processing clients, such as remote data processing client626 a, 626 b, and 626 n, in order to retrieve data from the databasedata in object storage service 330 to perform the query. As notedearlier, remote data processing clients 626 may be implemented by aclient library, plugin, driver or other component that sends requestsub-queries, such as sub-quer(ies) 632 a, 632 b, and 632 n to formatindependent data processing service 220. As noted above, in someembodiments, format independent data processing service 220 mayimplement a common network endpoint to which request sub-quer(ies) 632are directed, and then may dispatch the requests to respectiveprocessing nodes, such as processing nodes 640 a, 640 b, and 640 n.Remote data processing clients 626 may read, process, or otherwiseobtain results from processing nodes, including partial results ofdifferent operations (e.g., aggregation operations) and may providesub-query result(s), including result(s) 634 a, 634 b, and 634 c, backto query engine(s) 624, which may further process, combine, and orinclude them with results of location operations 618. In at least someembodiments, processing nodes 640 may filter, aggregate, or otherwisereduce or modify data from the database backups used to perform thequery in order to lessen the data transferred and handled by burstprocessing cluster 600, increasing the performance of the query at burstprocessing cluster 600. Although not illustrated in FIG. 6, some burstprocessing clusters may implement local attached storage and localprocessing similar to primary processing cluster 500 in FIG. 5. Forexample, a burst processing cluster that was scheduled for a period oftime that exceeds some threshold value (e.g., greater than 1 hour) mayread and store in persistent storage database data from the databasedata (e.g., directly or via format independent data processing service220), in some embodiments.

Although not illustrated in FIGS. 5 and 6, further communicationsbetween a primary processing cluster and burst processing cluster may beimplemented. For example, database metadata may be obtained at burstprocessing cluster 600 from a database backup and then updated asupdates are made at the primary processing cluster, in some embodiments,as discussed below with regard to FIG. 8. In some embodiments, computenodes 620 (or leader node 610) may request data directly from computenodes 520 in primary processing cluster 500), such as updated datablocks in a table of a database. In at least one embodiment, all of thedata used to perform a query may be obtained by compute nodes 620 fromcompute nodes 520 instead of utilizing format independent dataprocessing service 220 and a backup in a separate data store.

In at least some embodiments, burst processing cluster 600 may be asingle tenant resource, only performing burst queries for one database(or client or user account). In some embodiments, burst processingcluster 600 may be a multi-tenant environment, handling burst queriesfor different databases, different user accounts and/or differentclients. In such scenarios, security techniques to prevent data frombeing visible to unauthorized users may be implemented.

FIG. 7 is a logical block diagram illustrating an example of burstprocessing management at a primary cluster of a data warehouse service,according to some embodiments. Leader node 700 may be similar to leadernode 510 in FIG. 5. Leader node 700 may implement query planner 710 tohandle a received database query 702. For example, query planner 710 mayperform various query planning techniques, such as generating a parsetree from a query statement, applying various rewrites or rules-basedoptimizations to modify the parse tree (e.g., reordering differentoperations such as join operations), generating different plans forperforming the parsed/modified tree, and applying cost estimationtechniques to determine estimated costs of the different plans in orderto select a least costly plan as the query plan 712 to perform query702.

As illustrated in FIG. 5, burst manager 730 may be implemented by leadernode to select the cluster to perform database query 702, in someembodiments. For example, burst manager 730 may implement a primarycluster execution time classifier 740, a burst cluster execution timeclassifier 720, and an expected wait time calculator 780. Primarycluster execution time classifier 740 may be trained from primarycluster history 742 (e.g., using either online or offline trainingtechniques) to determine a prediction model for classifying executiontime of queries at the primary cluster. Burst cluster execution timeclassifier 720 may be trained from burst cluster history 722 (e.g.,using either online or offline training techniques) to determine aprediction model for classifying execution time of queries at the burstcluster. For example, supervised learning algorithms, such as linear(e.g., linear regression) or non-linear algorithms (e.g., decision tree(random forest) and K nearest neighbor) may be used to determine whichfeatures of a query indicate that it may be included in a predictedrange of execution time and may be used to train classifiers 720 and 740(although unsupervised techniques could be implemented as well). Forexample, burst cluster history 722 may be gathered by storing queryplans and associated execution times measured for the queries of thequery plans performed at the burst cluster (or burst clusters of asimilar configuration) to train burst cluster execution time classifier720. Similarly, burst manager 730 may track the execution timeassociated with query plans performed by the primary cluster to trainprimary cluster execution time classifier. Training components may beimplemented as part of burst manager 730 (not illustrated) in order togenerate models for classifiers 720 and 740. In other embodiments,external resources (e.g., a training system or service implemented aspart of provider network 200 may receive the cluster history for primaryand burst clusters, generate respective models and provide them to burstmanager 730.

Expected wait time calculator 780 may account for currently pending orqueued queries at the primary processing cluster in order to determinean expected time from which a query execution slot may become availableto perform the query. For example, query execution slot(s)/queue(s) 760may be maintained as part of leader node 700, in some embodiments. Queryexecution slot(s)/queue(s) 760 may, in some embodiments, be implementedas part of a queue (not illustrated). A query execution slot, such asquery execution slots 766 a, 766 b, 766 c, 768 a, 768 b, and 768 c, mayidentify a process that is allocated a certain portion of computingresources at a processing cluster (e.g., processor, memory, I/Obandwidth, network bandwidth, etc.) to perform a query assigned to thatslot. As illustrated in FIG. 7, some query execution slots may bereserved 764 for queries identified according to a query size (e.g.,“small” queries). A minimum number of query execution slots in reservedshort query execution resources 764, such as execution slots 768, may bemaintained so that only queries identified as of the appropriate size(e.g., “small”) can be performed on the reserved slots 768. Other slots,such as slots 762, may remain available for general query execution(e.g., execution of queries of all sizes), in some embodiments.

As discussed below with regard to FIG. 10, in some embodiments, expectedwait time calculator may apply a Markov decision process that may beused to estimate an expected time till a free slot can be made availableto perform the query. For example, the number of filled and availableexecution slots can be used to model different states in the Markovdecision process that selects queued queries according to a schedulingtechnique (e.g., shortest job first, FIFO, LIFO, etc.). The queries forthe Markov decision process may be identified that have the samepredicted range of execution time as the query (as discussed below withregard to element 1030). A cumulative distribution function may beapplied to the identified queries and the result of the cumulativedistribution function may bused in the Markov decision process toestimate an expected time to a free slot for the query, and thus theexpected wait time for the query.

Query size 742 may be provided to cluster selection 750, in someembodiments. Cluster selection 750 may apply different techniques forcomparing or evaluating the predicted execution time ranges 746 andexpected wait time 782, as discussed in detail below with regard toFIGS. 10-11C.

Cluster selection 750 may direct the query for local query execution754, in some embodiments. Primary cluster query execution 770 maygenerate the instructions and/or code to perform the query, as discussedabove (e.g., like query execution 514). Alternatively, cluster selection750 select a burst processing cluster to perform the query, and providea request, instruction, or other indication to perform burst queryexecution 752, in some embodiments. In at least some embodiments,further query planning to adapt the query plan to the burst cluster maybe performed (not illustrated). For example, the number of nodes in theburst processing cluster may be different, which may result in adifferent division of work in the query plan. Instructions may also beincluded for accessing data through format independent data processingservice 220 (e.g., storage object locations, access credentials,including specialized operators or instructions to leverage formatindependent data processing service 220 in the plan), in someembodiments.

In at least some embodiments, burst manager 730 may be configured viauser and/or control plane requests. For example, as discussed below withregard to FIG. 8, events that trigger the request for a burst processingcluster may be specified (e.g., scheduled time periods that a burstcluster may be active, the level of utilization of query executionslot(s)/queue(s) 760 before using a burst cluster, to enable/disablepredictive burst processing which may allow burst manager 730 to performtime series or other types of analysis to determine when burst capacitymay be needed for a database and preemptively obtain burst processingcluster(s) to meet the determined need), in some embodiments. In someembodiments, burst configuration 780 may be performed as part of otherworkload management interfaces or settings for a database or primaryprocessing cluster. For example, some query execution slots or queuesmay be identified as non-burstable (e.g., so that a query cannot beremoved from the queue/slot and sent to the burst processing clusterinstead). Bursting could be enabled/disabled for specifiedusers/applications, in some embodiments, via burst configuration 780.

In at least some embodiments, burst configuration 780 may allow users(or the control) to specify via an interface when burst performance ofqueries may be enabled or disabled for a primary processing cluster. Forexample, burst can be enabled/disabled automatically in order tooptimize for cost or performance, in some embodiments. A maximum queuetime or other performance criteria for the primary processing clustercould be specified as part of a burst configuration for queries, forinstance, may determine when bursting should occur (e.g., if querieswould exceed the queue time then begin using bust capacity). In someembodiments, a burst budget (e.g., a cost limitation for using burstprocessing clusters) or other limitation may be specified as part ofburst configuration in order to allow a user/client application toindicate when burst should stop so that the budget or other limitationis not exceeded (e.g., for a given time period, such as a day, week,month, etc.).

FIG. 8 is a logical block diagram illustrating example interactions toobtain and release a burst processing cluster from a pool of burstprocessing clusters, according to some embodiments. Burst manager 812 atleader node 810 may detect or determine when to obtain a burst clusterfor performing queries in various scenarios, as discussed below withregard to FIG. 11. Burst manager 812 may then request a burst cluster842 from control plane 310. The request may, in some embodiments,specify a type of burst cluster. In some embodiments, control plane 310may evaluate a manifest, index, or other data that describes availableprocessing cluster(s) 822 in burst cluster pool 820 in order to satisfythe request. For example, control plane 310 may identify a processingcluster that matches (or best matches) the specified configuration ofthe burst cluster request, in some embodiments. In some embodiments,control plane 310 may identify a burst cluster that was previously usedfor performing queries to the database hosted by the cluster of leadernode 810.

Control plane 310 may provision 844 the burst cluster, in someembodiments, from burst cluster pool, such as provisioned burst cluster824. Provisioning a burst cluster may include various operations toconfigure network connections between provisioned processing cluster forburst capacity 824 and leader node 810 and other services (e.g., formatindependent data processing service 220, object storage service 330,etc.). In some embodiments, access credentials, security tokens, and/orencryption keys may be provided so that provisioned processing clusterfor burst capacity 824 can access and database data to perform queriesfor the database. In some embodiments, initialization procedures,workflows or other operations may be started by control plane 310 atprovisioned processing cluster for burst capacity 824. For example,provisioned processing cluster for burst capacity 824 may get metadata848 from object-based storage service 330 that is stored as part ofdatabase metadata 830 in a database backup in order to perform queriesto the database. In some embodiments, provisioned processing cluster forburst capacity 824 may get metadata updates 850 directly from leadernode 810 (or other nodes in a primary processing cluster) in order tocatch up the metadata to account for changes that occurred after thebackup was stored. Control plane 310 may track the time to completeprovisioning or otherwise initialize provisioned processing cluster 824as well as for other provisioned burst clusters. The initializationtimes may be averaged and included in an evaluation of predictedexecution times, as discussed below with regard to FIG. 9.

Once provisioning is complete, provisioned processing cluster for burstcapacity 824 may be made available for performing queries. Control plane310 may identify the burst cluster 846 to leader node 810 (e.g., byproviding a network endpoint for provisioned cluster 824), in someembodiments. Leader node 810 may then begin directing selected queries852 to provisioned cluster 824, which may perform the queries and sendback query results 854 to leader node 810, which may provide the resultsto a client in turn. In this way, a client application does not have tolearn of and receive requests from a second location, provisionedcluster 824 when burst performance is used, in some embodiments.

When an event that triggers release of the burst cluster occurs, burstmanager 812 may send a request to control plane 310 to release the burstcluster 856 (e.g., by including the identifier of the provisionedcluster 824). Control plane 310 may then delete the burst cluster 858(e.g., by removing/deleting data and/or decommissioning/shutting downthe host resources for the provisioned cluster 824).

Although FIGS. 2-8 have been described and illustrated in the context ofa provider network implementing different data processing services, likea data warehouse service, the various components illustrated anddescribed in FIGS. 2-8 may be easily applied to other data processingsystems that can utilize additional query engines to receive redirectedqueries. As such, FIGS. 2-8 are not intended to be limiting as to otherembodiments of context dependent execution time prediction forredirecting queries.

FIG. 9 is a high-level flowchart illustrating methods and techniques toimplement context dependent execution time prediction for redirectingqueries, according to some embodiments. Various different systems anddevices may implement the various methods and techniques describedbelow, either singly or working together. Different combinations ofservices implemented in different provider networks operated bydifferent entities may implement some or all of the methods (e.g., adata warehouse cluster in a service of a first provider network, anintermediate data processing service in a second provider network, and adata set stored in a service of a third provider network). Differenttypes of query engines or non-distributed query performance platformsmay implement these techniques. Alternatively, various othercombinations of different systems and devices located within or withoutprovider networks may implement the below techniques. Therefore, theabove examples and or any other systems or devices referenced asperforming the illustrated method, are not intended to be limiting as toother different components, modules, systems, or devices.

As indicated at 910, a database query may be received, in variousembodiments. The database query may be received according to variousinterfaces, formats, and/or protocols. For example, the database querymay be formatted according to a query language such as Structured QueryLanguage (SQL), in some embodiments, or may be specified according to anApplication Programming Interface (API) for receiving queries. In atleast some embodiments, the database query may be one query of manyqueries that can be submitted by one or many different users to a samedatabase engine, processing platform, or system. For example, thedatabase query may compete for computing resources along with otherqueries received from other users to be executed with respect to adatabase in some embodiments. In at least some embodiments, the querymay be received at the first query engine (e.g., received at a primaryprocessing cluster as discussed above with regard to FIGS. 5-7). Inother embodiments, the query may be received at another query engine orat a request router.

As indicated at 920, a first prediction model for the first query enginetrained according to past query performance at the first query engine todetermine a first execution time prediction for the query at the firstquery engine, in some embodiments. For example, as discussed above withregard to FIG. 7, a prediction model may be generated according tovarious machine learning to techniques to classify a query's executiontime at the first query engine. A query plan for the query (e.g.,generated by a query planner and/or optimizer) may be used as thefeatures or inputs to the prediction model in order to determine anexecution time. A predicted execution time could be a single value(e.g., 5 minutes) or a range of execution times, as discussed in detailbelow with regard to FIG. 10. Other features, inputs, or variables maybe added to (or evaluated with) the predicted execution time, such aspredicted resource utilization, predicted network transmissionperformance, or a predicted wait time for the query, as discussed abovein FIG. 7 and below in FIG. 10.

As indicated at 930, a first prediction model for the first query enginetrained according to past query performance at the first query engine todetermine a first execution time prediction for the query at the firstquery engine, in some embodiments. Like the discussion above with regardto element 920, a prediction model may be generated according to variousmachine learning to techniques to classify a query's execution time atthe first query engine. A query plan for the query (e.g., generated by aquery planner and/or optimizer) may be used as the features or inputs tothe prediction model in order to determine an execution time. Apredicted execution time could be a single value (e.g., 5 minutes) or arange of execution times, as discussed in detail below with regard toFIG. 10. Other features, inputs, or variables may be added to (orevaluated with) the predicted execution time, such as predicted resourceutilization, predicted network transmission performance, or a predictedinitialization time to prepare the secondary query engine for acceptingthe query, as discussed above in FIG. 7 and below in FIG. 10. Becausethe query engines may be implemented in different contexts (e.g.,different underlying hardware, different techniques for accessingdatabase data, different features of performance (e.g., initializationvs. waiting)), in at least some embodiments, the features consideredalong or included with the predicted execution time for the queryengines may differ.

As indicated at 940, a comparison between the second execution timeprediction and the first execution time prediction may be performed. Forexample, a single value comparison (e.g., 5 minutes to 3 minutes may beperformed). As noted above, in some embodiments, additional features maybe included to adjust or modify the execution times (e.g., increasingpredicted execution time values as a result of a high predicted memoryor network utilization, adding predicted wait time or initializationtime to the predicted execution time values, and so on). In someembodiments, multiple secondary query engines may be available and thusa predicted execution time for may be determined for each one (asdiscussed above at element 730, and the resulting predictions may beused to filter, select, or choose the query engine to be the secondquery engine compared with the first query engine (e.g., the queryengine with the lowest predicted execution time).

If the second execution time prediction is less than the first executiontime prediction, then as indicated at 950 the query may be performed atthe second query engine. For example, as discussed above in FIG. 5, aquery may be forwarded on to the second query engine, along with a queryplan. In other embodiments, the query alone may be sent and a differentquery plan for the query may be determined at the second query engine.The query may be performed at the second query engine using local and/orremote copies of the database (e.g., via a format independent dataprocessing service), in some embodiments.

If the second execution time prediction is not less than the firstexecution time prediction, then as indicated at 960, the query may beperformed at the first query engine. Various scheduling techniques forqueries at the first query engine may take advantage of the predictedexecution time for the query at the first query engine (e.g., in orderto order query performance based on execution time), in someembodiments.

As noted above, a predicted range of execution time for a query may bedetermined when applying a prediction model to a query for differentquery engines. FIG. 10 is a high-level flowchart illustrating methodsand techniques to implement evaluating predicted execution time rangesto implement context dependent execution time prediction for redirectingqueries, according to some embodiments. As indicated at 1010, anexpected wait time (referred to herein as “E”) may be determined for aquery received at a first query engine, in some embodiments. Forexample, an expected wait time may be determined in one or more phases.If no queries are queued, held, or otherwise waiting to be performed bya query engine, then an E may be an expected wait time of zero. If,however, a query is queued, held, or otherwise waiting, then a non-zeroexpected wait time may be determined.

To predict an expected wait time, various techniques may be implemented.For example, in one technique the predicted execution times ofpreviously recited queries that are determined when the queries arereceived may be summed up. In embodiments where multiple execution slotsare implemented for performing queries in parallel (as discussed abovewith regard to FIG. 7, then summation of predicted execution times maybe modified according to the number of execution slots (e.g., divided bythe number of execution slots). In some embodiments, a Markov decisionprocess may be used to estimate an expected time till a free slot can bemade available to perform the query. For example, the number of filledand available execution slots can be used to model different states inthe Markov decision process that selects queued queries according to ascheduling technique (e.g., shortest job first, FIFO, LIFO, etc.). Thequeries for the Markov decision process may be identified that have thesame predicted range of execution time as the query (as discussed belowwith regard to element 1030). A cumulative distribution function may beapplied to the identified queries and the result of the cumulativedistribution function may bused in the Markov decision process toestimate an expected time to a free slot for the query, and thus theexpected wait time for the query.

As indicated at 1020, if E is no greater than zero, then the query maybe performed at the first query engine (as no other work is beingperformed that would cause a wait for the query). If E is greater thanzero, then other analysis may be performed.

For example, as indicated at 1030, a predicted range of execution time(R₁) may be determined for the query at the first query engine, in someembodiments. For example, the execution plan of the query as determinedby a query planner and/or optimizer may be evaluated. The plan mayinclude various operations a query has to perform like select, joinaggregation etc. and also the amount of work done by each operator(e.g., a time or other cost value). An execution time prediction modelmay take this plan as an input and converts it into a vector of featurevalues, which when compared with the feature values of different rangesof predicted execution time may be identified with the closest or mostsimilar range of execution time, in some embodiments. In someembodiments, feature values may include the number of operators of eachtype of operators (e.g., number of selects, joins, aggregations, etc.)and a summary of the work done. Consider if the plan were to have 5 joinoperators and each join operators may work on 1 gigabyte data. In such ascenario, the feature value vector for join operators may include both 5and 5 GB (5*1 GB) in addition to similar values for other operators.

In various embodiments, the prediction model may classify or otherwisedetermine according to different ranges of execution time (which may benon-overlapping), such as ranges of execution time from 1 second to 10seconds, 100 seconds to 100 seconds, 100 seconds to 1,000 seconds and soon). In some embodiments, the different ranges may be determined byconsidering exponentially increasing percentile execution time of aworkload, such as a 1 second may correspond to 50th percentile (P50) ofexecution times, 10 second to P75 (P50 of rest 50% of the queries), 100s to P87.5 (P50 of the rest 25% queries) and so on. In this way, queriesmay be redirected to additional query engines in a way to scale tovastly different execution time of queries on different clusters. Inaddition, it gives more accurate results as compared to linearlyconstructed buckets (P25, P50, P75, P100, etc.). Thus, in someembodiments, R₁ may be determined according to which range of executiontime is determined for the query.

As indicated 1040, a predicted range of execution time (R₂) may bedetermined for the query at the second query engine, in someembodiments. Like the discussion above with regard to the predictedrange of execution time R1 for a query engine at element 1030, theexecution plan for the query may be evaluated to determine a featurevector for input to an execution time prediction model, which mayindicate one of a different execution time ranges as the predictedexecution time range. As the prediction model may account for adifferent execution context of the second query engine than theexecution context of the the first query engine, the prediction modeland/or classification technique applied for the second query engine maybe different than the prediction model and/or classification.

Different combinations of predicted execution ranges and E may beconsidered. For example, as indicated at 1050, if the minimum value ofR₁ added to the expected wait time E is greater than the maximum valueof R₂, then the query may be performed at the second query engine, asindicated at 1090. For example, FIG. 11A, illustrates such a comparison.First query engine 1110 may have a minimum value R₁ 1112 added to E 1114as a total execution time. The minimum value of R₁ may be the lowestvalue within the range of execution time values (e.g., 10,000 to 10,500,where R₁=10,000). Second query engine 1120 may have a maximum value ofR₂ that while larger than the minimum value of R₁ on its own, is lessthan the total execution value at first query engine 1110. The maximumvalue of R₂ may be the highest value within the range of execution timevalues (e.g., 15,000 to 15,500, where R₂=15,500).

If the minimum value of R₁ added to the expected wait time E is notgreater than the maximum value of R₂, then another evaluation may beperformed. As indicated at 1060, if the minimum value of R₁ added to theexpected wait time E is less than the maximum value of R₂, then thequery may be performed at the first query engine, as indicated by thepositive exit from 1060 to 1080. Consider FIG. 11B. First query engine1130 has a minimum value of R₁ 1132 added to E 1134 that is less thanthe maximum value R₂ 1142 of second query engine 1140.

In the event that there is a tie between the minimum value of R₁ addedto the expected wait time E and the maximum value of R₂ then anevaluation of R₂ compared with some threshold, such as a long queryexecution time range 1160 in FIG. 11 c, may be performed, as indicatedat 1070. A long query execution time range may be represented by athreshold range of time after which query should by execute at asecondary cluster. For example, a long query execution time range couldkeep the first query engine free to do other work while the second queryengine performs the query, in some embodiments. As illustrated in FIG.11C, second query engine 1150 may have a minimum execution time R₂ 1142that is greater than the long query execution range 1160. If R₂ does notexceed the minimum execution time, then as indicated by the positiveexit from 1070 to 1090, the query may be performed at the second queryengine. If a second query engine may have a minimum execution timelonger than long range query execution time range, then the query may beperformed at the first query engine, as indicated by the negative exitfrom 1070.

The methods described herein may in various embodiments be implementedby any combination of hardware and software. For example, in oneembodiment, the methods may be implemented by a computer system (e.g., acomputer system as in FIG. 12) that includes one or more processorsexecuting program instructions stored on a computer-readable storagemedium coupled to the processors. The program instructions may implementthe functionality described herein (e.g., the functionality of variousservers and other components that implement the network-based virtualcomputing resource provider described herein). The various methods asillustrated in the figures and described herein represent exampleembodiments of methods. The order of any method may be changed, andvarious elements may be added, reordered, combined, omitted, modified,etc.

Embodiments of context dependent execution time prediction forredirecting queries as described herein may be executed on one or morecomputer systems, which may interact with various other devices. Onesuch computer system is illustrated by FIG. 12. In differentembodiments, computer system 2000 may be any of various types ofdevices, including, but not limited to, a personal computer system,desktop computer, laptop, notebook, or netbook computer, mainframecomputer system, handheld computer, workstation, network computer, acamera, a set top box, a mobile device, a consumer device, video gameconsole, handheld video game device, application server, storage device,a peripheral device such as a switch, modem, router, or in general anytype of computing node, compute node, computing device, compute device,or electronic device.

In the illustrated embodiment, computer system 2000 includes one or moreprocessors 1010 coupled to a system memory 1020 via an input/output(I/O) interface 1030. Computer system 2000 further includes a networkinterface 1040 coupled to I/O interface 1030, and one or moreinput/output devices 1050, such as cursor control device 1060, keyboard1070, and display(s) 1080. Display(s) 1080 may include standard computermonitor(s) and/or other display systems, technologies or devices. In atleast some implementations, the input/output devices 1050 may alsoinclude a touch- or multi-touch enabled device such as a pad or tabletvia which a user enters input via a stylus-type device and/or one ormore digits. In some embodiments, it is contemplated that embodimentsmay be implemented using a single instance of computer system 2000,while in other embodiments multiple such systems, or multiple nodesmaking up computer system 2000, may host different portions or instancesof embodiments. For example, in one embodiment some elements may beimplemented via one or more nodes of computer system 2000 that aredistinct from those nodes implementing other elements.

In various embodiments, computer system 2000 may be a uniprocessorsystem including one processor 1010, or a multiprocessor systemincluding several processors 1010 (e.g., two, four, eight, or anothersuitable number). Processors 1010 may be any suitable processor capableof executing instructions. For example, in various embodiments,processors 1010 may be general-purpose or embedded processorsimplementing any of a variety of instruction set architectures (ISAs),such as the x86, PowerPC, SPARC, or MIPS ISAs, or any other suitableISA. In multiprocessor systems, each of processors 1010 may commonly,but not necessarily, implement the same ISA.

In some embodiments, at least one processor 1010 may be a graphicsprocessing unit. A graphics processing unit or GPU may be considered adedicated graphics-rendering device for a personal computer,workstation, game console or other computing or electronic device.Modern GPUs may be very efficient at manipulating and displayingcomputer graphics, and their highly parallel structure may make themmore effective than typical CPUs for a range of complex graphicalalgorithms. For example, a graphics processor may implement a number ofgraphics primitive operations in a way that makes executing them muchfaster than drawing directly to the screen with a host centralprocessing unit (CPU). In various embodiments, graphics rendering may,at least in part, be implemented by program instructions that execute onone of, or parallel execution on two or more of, such GPUs. The GPU(s)may implement one or more application programmer interfaces (APIs) thatpermit programmers to invoke the functionality of the GPU(s). SuitableGPUs may be commercially available from vendors such as NVIDIACorporation, ATI Technologies (AMD), and others.

System memory 1020 may store program instructions and/or data accessibleby processor 1010. In various embodiments, system memory 1020 may beimplemented using any suitable memory technology, such as static randomaccess memory (SRAM), synchronous dynamic RAM (SDRAM),nonvolatile/Flash-type memory, or any other type of memory. In theillustrated embodiment, program instructions and data implementingdesired functions, such as those described above are shown stored withinsystem memory 1020 as program instructions 1025 and data storage 1035,respectively. In other embodiments, program instructions and/or data maybe received, sent or stored upon different types of computer-accessiblemedia or on similar media separate from system memory 1020 or computersystem 2000. Generally speaking, a non-transitory, computer-readablestorage medium may include storage media or memory media such asmagnetic or optical media, e.g., disk or CD/DVD-ROM coupled to computersystem 2000 via I/O interface 1030. Program instructions and data storedvia a computer-readable medium may be transmitted by transmission mediaor signals such as electrical, electromagnetic, or digital signals,which may be conveyed via a communication medium such as a networkand/or a wireless link, such as may be implemented via network interface1040.

In one embodiment, I/O interface 1030 may coordinate I/O traffic betweenprocessor 1010, system memory 1020, and any peripheral devices in thedevice, including network interface 1040 or other peripheral interfaces,such as input/output devices 1050. In some embodiments, I/O interface1030 may perform any necessary protocol, timing or other datatransformations to convert data signals from one component (e.g., systemmemory 1020) into a format suitable for use by another component (e.g.,processor 1010). In some embodiments, I/O interface 1030 may includesupport for devices attached through various types of peripheral buses,such as a variant of the Peripheral Component Interconnect (PCI) busstandard or the Universal Serial Bus (USB) standard, for example. Insome embodiments, the function of I/O interface 1030 may be split intotwo or more separate components, such as a north bridge and a southbridge, for example. In addition, in some embodiments some or all of thefunctionality of I/O interface 1030, such as an interface to systemmemory 1020, may be incorporated directly into processor 1010.

Network interface 1040 may allow data to be exchanged between computersystem 2000 and other devices attached to a network, such as othercomputer systems, or between nodes of computer system 2000. In variousembodiments, network interface 1040 may support communication via wiredor wireless general data networks, such as any suitable type of Ethernetnetwork, for example; via telecommunications/telephony networks such asanalog voice networks or digital fiber communications networks; viastorage area networks such as Fibre Channel SANs, or via any othersuitable type of network and/or protocol.

Input/output devices 1050 may, in some embodiments, include one or moredisplay terminals, keyboards, keypads, touchpads, scanning devices,voice or optical recognition devices, or any other devices suitable forentering or retrieving data by one or more computer system 2000.Multiple input/output devices 1050 may be present in computer system2000 or may be distributed on various nodes of computer system 2000. Insome embodiments, similar input/output devices may be separate fromcomputer system 2000 and may interact with one or more nodes of computersystem 2000 through a wired or wireless connection, such as over networkinterface 1040.

As shown in FIG. 12, memory 1020 may include program instructions 1025,that implement the various methods and techniques as described herein,and data storage 1035, comprising various data accessible by programinstructions 1025. In one embodiment, program instructions 1025 mayinclude software elements of embodiments as described herein and asillustrated in the Figures. Data storage 1035 may include data that maybe used in embodiments. In other embodiments, other or differentsoftware elements and data may be included.

Those skilled in the art will appreciate that computer system 2000 ismerely illustrative and is not intended to limit the scope of thetechniques as described herein. In particular, the computer system anddevices may include any combination of hardware or software that canperform the indicated functions, including a computer, personal computersystem, desktop computer, laptop, notebook, or netbook computer,mainframe computer system, handheld computer, workstation, networkcomputer, a camera, a set top box, a mobile device, network device,internet appliance, PDA, wireless phones, pagers, a consumer device,video game console, handheld video game device, application server,storage device, a peripheral device such as a switch, modem, router, orin general any type of computing or electronic device. Computer system2000 may also be connected to other devices that are not illustrated, orinstead may operate as a stand-alone system. In addition, thefunctionality provided by the illustrated components may in someembodiments be combined in fewer components or distributed in additionalcomponents. Similarly, in some embodiments, the functionality of some ofthe illustrated components may not be provided and/or other additionalfunctionality may be available.

Those skilled in the art will also appreciate that, while various itemsare illustrated as being stored in memory or on storage while beingused, these items or portions of them may be transferred between memoryand other storage devices for purposes of memory management and dataintegrity. Alternatively, in other embodiments some or all of thesoftware components may execute in memory on another device andcommunicate with the illustrated computer system via inter-computercommunication. Some or all of the system components or data structuresmay also be stored (e.g., as instructions or structured data) on acomputer-accessible medium or a portable article to be read by anappropriate drive, various examples of which are described above. Insome embodiments, instructions stored on a non-transitory,computer-accessible medium separate from computer system 2000 may betransmitted to computer system 2000 via transmission media or signalssuch as electrical, electromagnetic, or digital signals, conveyed via acommunication medium such as a network and/or a wireless link. Variousembodiments may further include receiving, sending or storinginstructions and/or data implemented in accordance with the foregoingdescription upon a computer-accessible medium. Accordingly, the presentinvention may be practiced with other computer system configurations.

It is noted that any of the distributed system embodiments describedherein, or any of their components, may be implemented as one or moreweb services. In some embodiments, a network-based service may beimplemented by a software and/or hardware system designed to supportinteroperable machine-to-machine interaction over a network. Anetwork-based service may have an interface described in amachine-processable format, such as the Web Services DescriptionLanguage (WSDL). Other systems may interact with the web service in amanner prescribed by the description of the network-based service'sinterface. For example, the network-based service may define variousoperations that other systems may invoke, and may define a particularapplication programming interface (API) to which other systems may beexpected to conform when requesting the various operations.

In various embodiments, a network-based service may be requested orinvoked through the use of a message that includes parameters and/ordata associated with the network-based services request. Such a messagemay be formatted according to a particular markup language such asExtensible Markup Language (XML), and/or may be encapsulated using aprotocol such as Simple Object Access Protocol (SOAP). To perform a webservices request, a network-based services client may assemble a messageincluding the request and convey the message to an addressable endpoint(e.g., a Uniform Resource Locator (URL)) corresponding to the webservice, using an Internet-based application layer transfer protocolsuch as Hypertext Transfer Protocol (HTTP).

In some embodiments, web services may be implemented usingRepresentational State Transfer (“RESTful”) techniques rather thanmessage-based techniques. For example, a web service implementedaccording to a RESTful technique may be invoked through parametersincluded within an HTTP method such as PUT, GET, or DELETE, rather thanencapsulated within a SOAP message.

The various methods as illustrated in the FIGS. and described hereinrepresent example embodiments of methods. The methods may be implementedin software, hardware, or a combination thereof. The order of method maybe changed, and various elements may be added, reordered, combined,omitted, modified, etc.

Various modifications and changes may be made as would be obvious to aperson skilled in the art having the benefit of this disclosure. It isintended that the invention embrace all such modifications and changesand, accordingly, the above description to be regarded in anillustrative rather than a restrictive sense.

What is claimed is:
 1. A system, comprising: at least one processor; anda memory, storing program instructions that when executed cause the atleast one processor to implement a primary processing cluster for adatabase; the primary processing cluster, configured to: receive a queryto the database; responsive to a determination of an expected wait toperform the query at the primary processing cluster: classifyperformance of the query at the primary processing cluster according toa first prediction model for the primary processing cluster trainedaccording to past query performance at the primary processing cluster todetermine a first execution time prediction for the query at the primaryprocessing cluster; classify performance of the query at a burstprocessing cluster according to a second prediction model for the burstprocessing cluster trained according to past query performance at theburst processing cluster to determine a second execution time predictionfor the query at the burst processing cluster; select the burstprocessing cluster to perform the query according to a determinationthat the second execution time prediction is less than the firstexecution time prediction; and forward the query to the burst processingcluster to be performed with respect to the database.
 2. The system ofclaim 1, wherein the first execution time prediction for the query atthe primary processing cluster includes an expected wait time at theprimary processing cluster determined for the query.
 3. The system ofclaim 1, wherein to classify performance of the query at the primaryprocessing cluster, the primary processing cluster is configured toidentify a first predicted range of execution time that includes thefirst execution time prediction; wherein to classify performance of thequery at the secondary processing cluster, the secondary processingcluster is configured to identify a second predicted range of executiontime that includes the second execution time prediction; and wherein todetermine that the second execution time prediction is less than thefirst execution time prediction compares a minimum value of the secondpredicted range of execution time that includes the second executiontime prediction with a maximum value of the first predicted range ofexecution time that includes the first execution time.
 4. The system ofclaim 1, wherein the database is stored as a part of a network-baseddata warehouse service that implements the primary processing clusterand the burst processing cluster, wherein the burst processing clusteraccesses a copy of the database stored in a storage service through aformat-independent data processing service, and wherein the burstprocessing cluster is provisioned from a pool of processing clustersimplemented for burst query processing.
 5. A method, comprising:receiving a query to a database at a first query engine; applying afirst prediction model for the first query engine trained according topast query performance at the first query engine to determine a firstexecution time prediction for the query at the first query engine;applying a second prediction model for a second query engine trainedaccording to past query performance at the second query engine todetermine a second execution time prediction for the query at the secondquery engine; comparing the first execution time prediction with thesecond execution time prediction to determine that the second executiontime prediction is less than the first execution time prediction; andsending the query to the second query engine to be performed withrespect to the database.
 6. The method of claim 5, wherein applying thefirst prediction model for the first query engine trained according topast query performance at the first query engine to determine the firstexecution time prediction for the query at the first query enginecomprises identifying a first predicted range of execution time thatincludes the first execution time prediction; wherein applying thesecond prediction model for the second query engine trained according topast query performance at the second query engine to determine thesecond execution time prediction for the query at the second queryengine comprises identifying a second predicted range of execution timethat includes the second execution time prediction; and wherein aminimum value of the second predicted range of execution time is thesecond execution time prediction and a maximum value of the firstpredicted range of execution time is the first execution time predictionthat are compared to determine that the second execution time predictionis less than the first execution time prediction.
 7. The method of claim5, further comprising determining an initialization time forprovisioning the second query engine to include as part of the secondpredicted execution time when comparing the first predicted executiontime with the second predicted execution time.
 8. The method of claim 5,further comprising: receiving a second query to the database at thefirst query engine; responsive to determining an expected wait time forthe second query at the first query engine: applying the secondprediction model for the second query engine trained according to pastquery performance at the second query engine to determine a thirdexecution time prediction for the second query at the second queryengine; comparing the third execution time prediction with an executiontime threshold to determine that the third execution time prediction isgreater than the execution time threshold; and performing the secondquery to the database at the second query engine.
 9. The method of claim5, wherein performing the query at the second query engine comprisessending requests to access the database via format independent dataservice that accesses data of the database and returns results to thesecond query engine to complete the query.
 10. The method of claim 1,wherein the second query engine is one of a plurality of query enginesthat can perform queries to the database in addition to the first queryengine, and wherein respective prediction models for the plurality ofquery engines are applied to determine respective execution timepredictions for the query at the plurality of query engines, and whereinthe method further comprises selecting the second query engine forcomparison with the first query engine according to an evaluation of therespective execution time predictions.
 11. The method of claim 5,further comprising determining an expected wait time for the query atthe first query engine to include as part of the first predictedexecution time when comparing the first predicted execution time withthe second predicted execution time.
 12. The method of claim 11, whereindetermining the expected wait time for the query at the first queryengine comprises: identifying those queries waiting at the first queryengine classified in a same predicted range of execution time as thequery; and applying a Markov decision process to a workload at the firstquery engine determined from a cumulative distribution function of theidentified queries to estimate the expected wait time for the query. 13.The method of claim 5, wherein the first query engine and the secondquery engine are implemented as part of a network-based service, andwherein the method further comprises provisioning the second queryengine from a pool of query engines in response to determining that thesecond predicted execution time is less than the first predictedexecution time, wherein the pool of query engines is implemented as partof the network-based service for burst query performance.
 14. One ormore non-transitory, computer-readable storage media, storing programinstructions that when executed on or across one or more computingdevices cause the one or more computing devices to implement: receivinga query to a database at a first query engine; responsive to determiningan expected wait time for the query at the first query engine: applyinga first prediction model for the first query engine trained according topast query performance at the first query engine to determine a firstexecution time prediction for the query at the first query engine;applying a second prediction model for a second query engine trainedaccording to past query performance at the second query engine todetermine a second execution time prediction for the query at the secondquery engine; comparing the first execution time prediction with thesecond execution time prediction to determine that the second executiontime prediction is less than the first execution time prediction; andsending the query to the second query engine to be performed withrespect to the database.
 15. The one or more non-transitory,computer-readable storage media of claim 14, wherein the one or morenon-transitory, computer-readable storage media further comprise programinstructions to cause the one or more computing devices to implementdetermining an expected wait time for the query at the first queryengine to include as part of the first predicted execution time whencomparing the first predicted execution time with the second predictedexecution time.
 16. The one or more non-transitory, computer-readablestorage media of claim 14, wherein the one or more non-transitory,computer-readable storage media further comprise program instructions tocause the one or more computing devices to implement determining aninitialization time for provisioning the second query engine to includeas part of the second predicted execution time when comparing the firstpredicted execution time with the second predicted execution time. 17.The one or more non-transitory, computer-readable storage media of claim14, wherein the second query engine accesses a copy of the databasestored at the second query engine to complete the query.
 18. The one ormore non-transitory, computer-readable storage media of claim 14,wherein, in applying the first prediction model for the first queryengine trained according to past query performance at the first queryengine to determine the first execution time prediction for the query atthe first query engine, the program instructions cause the one or morecomputing devices to implement identifying a first predicted range ofexecution time that includes the first execution time prediction;wherein, in applying the second prediction model for the second queryengine trained according to past query performance at the second queryengine to determine the second execution time prediction for the queryat the second query engine, the program instructions cause the one ormore computing devices to implement identifying a second predicted rangeof execution time that includes the second execution time prediction;and wherein a minimum value of the second predicted range of executiontime is the second execution time prediction and a maximum value of thefirst predicted range of execution time is the first execution timeprediction that are compared to determine that the second execution timeprediction is less than the first execution time prediction.
 19. The oneor more non-transitory, computer-readable storage media of claim 14,wherein the one or more non-transitory computer readable comprisesfurther program instructions that when executed by the one or morecomputing devices cause the one or more computing devices to furtherimplement: receiving a second query to the database at the first queryengine; responsive to determining an expected wait time for the secondquery at the first query engine: applying the first prediction model forthe first query engine trained according to past query performance atthe first query engine to determine a third execution time predictionfor the second query at the first query engine; applying the secondprediction model for the second query engine trained according to pastquery performance at the second query engine to determine a fourthexecution time prediction for the second query at the second queryengine; comparing the third execution time prediction with the fourthexecution time prediction to determine that the third execution timeprediction is less than the fourth execution time prediction; andperforming the second query to the database at the first query engine.20. The one or more non-transitory, computer-readable storage media ofclaim 14, wherein the database is stored as a part of a network-baseddata warehouse service that implements the first query engine and thesecond query engine and wherein the second query engine is provisionedfrom a pool of processing clusters implemented for burst queryprocessing.